﻿<Window x:Class="FacebookTestUserManager.FriendSettingWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Friends Relationship Setting" Height="400" Width="300">
    <StackPanel>
        <Button x:Name="connectAllFriends" Content="Make relations to all Test Users" Margin="2" Click="connectAllFriends_Click" />
        <DataGrid AutoGenerateColumns="False" HorizontalAlignment="Stretch" ItemsSource="{Binding}"
                  Name="dataGrid1" VerticalAlignment="Stretch" CanUserAddRows="False">
            <DataGrid.Resources>
                <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
            </DataGrid.Resources>
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="ID">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding id}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Header="Friend Setting">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Visibility="{Binding Path=isNotFriend, Converter={StaticResource BoolToVisConverter}}">
                                <Hyperlink x:Name="friendsSetting" Click="friendsSetting_Click" DataContext="{Binding idAndToken}">Make a relation</Hyperlink>
                            </TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
</Window>
